<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="include :: header('项目成本预估表打印')" />
	<style type="text/css">
		body {
			overflow-x: auto;
		}
		table {
			font-size: 14px;
			font-weight:500;
			font-family: 线体;
			margin-left: 50px;
	    	border-collapse: collapse;
		}
	    table, tr, td{
		    text-align: center;
		    width: 1200px;
		    height: 40px;
		}
		.items td{ height:30px; border: 1px solid ;}
		
		@media print{
		   body {
		       height: auto !important;
		   }
		}
	</style>
</head>
<body class="white-bg">
    <table style="margin-top: 0px;">
		<!-- 打印网页时通过hidden-print隐藏元素 -->
	    <div class="text-right hidden-print">
	        <input th:value="${gcProjectCbpj.id}" type="hidden" id="id" name="id" />
            <button id="button-yes" type="button" class="btn btn-sm btn-primary" ><i class="fa fa-check"></i>审核通过</button>&nbsp;
            <button id="button-no" type="button" class="btn btn-sm btn-danger" ><i class="fa fa-remove"></i>审核拒绝</button>&nbsp;
            <button type="button" class="btn btn-sm btn-danger" onclick="closeItem()"><i class="fa fa-reply-all"></i>关 闭 </button>
	    </div>
	    <tr>
			<td style="width: 10%">&nbsp;</td>
			<td style="width: 10%">&nbsp;</td>
			<td style="width: 10%">&nbsp;</td>
			<td style="width: 10%">&nbsp;</td>
			<td style="width: 10%">&nbsp;</td>
			<td style="width: 10%">&nbsp;</td>
			<td style="width: 10%">&nbsp;</td>
			<td style="width: 10%">&nbsp;</td>
			<td style="width: 10%">&nbsp;</td>
		</tr>
		<tr style="height: 60px;">
			<td><img style="height: 30px" src="/ruoyi.png"></td>
			<td colspan="8" style="font-size: 30px;font-family: 线体;font-weight:500;"> 广东建筑艺术设计院有限公司中南分公司-项目成本预估表 </td>
		</tr>
	</table>
	<table class="items">
		<tr>
			<td ><b>项目名称</b></td>
			<td colspan="5" th:text="${gcProjectCbpj.xmmc}">&nbsp;</td>
			<td ><b>项目负责人</b></td>
			<td th:text="${gcProjectCbpj.xmfzr}">&nbsp;</td>
			<td ><b>评估时间</b></td>
			<td th:text="${#dates.format(gcProjectCbpj.pgsj, 'yyyy-MM-dd')}">&nbsp;</td>
		</tr>
		<tr>
			<td ><b>成本类型</b></td>
			<td ><b>名称及类型</b></td>
			<td ><b>型&nbsp;&nbsp;号</b></td>
			<td ><b>数&nbsp;&nbsp;量</b></td>
			<td ><b>税&nbsp;&nbsp;率</b></td>
			<td ><b>成本单价</b></td>
			<td ><b>进项税金</b></td>
			<td ><b>小计价格</b></td>
			<td ><b>占合同比例</b></td>
			<td ><b>备注</b></td>
		</tr>
		<tr th:each="lis,status:${gcProjectCbpj.item}">
			<td style="width: 10%" th:text="${lis.type}"></td>
			<td style="width: 10%" th:text="${lis.name}">&nbsp;</td>
			<td style="width: 19%" th:text="${lis.xinghao}">&nbsp;</td>
			<td style="width: 6%" th:text="${lis.count}">&nbsp;</td>
			<td style="width: 6%" ><span th:text="${lis.suilv}"></span>%</td>
			<td style="width: 6%" th:text="${lis.cbdj}">&nbsp;</td>
			<td style="width: 10%" th:text="${lis.jxsj}">&nbsp;</td>
			<td style="width: 10%" th:text="${lis.xjjg}">&nbsp;</td>
			<td style="width: 10%" th:text="${lis.zbs}">&nbsp;</td>
			<td style="width: 10%" th:text="${lis.memo}">&nbsp;</td>
		</tr>
		<tr>
			<td ><b>利润预估</b></td>
			<td colspan="5">&nbsp;</td>
			<td th:text="${gcProjectCbpj.lryg}"></td>
			<td >&nbsp;</td>
			<td th:text="${gcProjectCbpj.zbs}">&nbsp;</td>
			<td >&nbsp;</td>
		</tr>
		<tr>
			<td ><b>成本合计</b></td>
			<td colspan="5">&nbsp;</td>
			<td th:text="${gcProjectCbpj.cbhj}"></td>
			<td >&nbsp;</td>
			<td >&nbsp;</td>
			<td >&nbsp;</td>
		</tr>
	</table>
<!-- 	<table style="margin-top: 15px;"> -->
<!-- 		<tr> -->
<!-- 			<td colspan="2" style="width: 22%;text-align: left;"><b>项目负责人：</b><span th:text="${gcProjectCbpj.xmfzr}"></span></td> -->
<!-- 			<td colspan="2" style="width: 14%;text-align: left;"><b>工程负责人审核：</b><span th:text="${gcProjectCbpj.xmjlsh}"></span></td> -->
<!-- 			<td style="width: 10%">&nbsp;</td> -->
<!-- 			<td style="width: 10%;text-align: left;"><b>总经理审核：</b><span th:text="${gcProjectCbpj.zjlsh}"></span></td> -->
<!-- 			<td style="width: 10%">&nbsp;</td> -->
<!-- 		</tr> -->
<!-- 	</table> -->
	<table style="margin-top: 15px;">
		<tr>
			<td colspan="7">
				<div align="left"><b>审批意见：</b></div></br>
				<textarea id="spyj" class="form-control"></textarea>
			</td>
		</tr>
	</table>
    <th:block th:include="include :: footer" />
    <script type="text/javascript">
        function printPage() {
            window.print();
        }
        
        $("#button-yes").click(function(){
	    	$.modal.confirm("确认要审核通过吗?", function() {
	    		$.ajax({
    				url: "/gcgl/cbpj/gcyes",
    				type: "post",
    				data: { "ids": $("#id").val(),"spyj": $("#spyj").val() },
    				dataType: 'json',
    				success: function(data) {
    					$.operate.saveReload(data);
    				},
    				error: function(xhr, type, errorThrown) {
    					//异常处理；
    					$.modal.alert("请稍后再试！");
    					$.operate.saveReload(data);
    				}
    			});
	    	});
	    })
	    
	    $("#button-no").click(function(){
	    	$.modal.confirm("确认要审核拒绝吗?", function() {
	    		$.ajax({
    				url: "/gcgl/cbpj/gcno",
    				type: "post",
    				data: { "ids": $("#id").val(),"spyj": $("#spyj").val() },
    				dataType: 'json',
    				success: function(data) {
    					$.operate.saveReload(data);
    				},
    				error: function(xhr, type, errorThrown) {
    					//异常处理；
    					$.modal.alert("请稍后再试！");
    					$.operate.saveReload(data);
    				}
    			});
	    	});
	    })
    </script>
</body>
</html>